Skip to content

feat: migrate gemini default and deprecations to gemini-2.5-pro#17355

Open
shuoweil wants to merge 1 commit into
mainfrom
shuowei-deprecate-gemini2p5
Open

feat: migrate gemini default and deprecations to gemini-2.5-pro#17355
shuoweil wants to merge 1 commit into
mainfrom
shuowei-deprecate-gemini2p5

Conversation

@shuoweil
Copy link
Copy Markdown
Contributor

@shuoweil shuoweil commented Jun 2, 2026

This PR updates the default Gemini model and deprecation warnings in bigframes to align with model policy updates taking effect on June 15, 2026.

Fixes #<519302924> 🦕

@shuoweil shuoweil self-assigned this Jun 2, 2026
@shuoweil shuoweil requested review from a team as code owners June 2, 2026 22:54
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the default LLM model from 'gemini-2.0-flash-001' to 'gemini-2.5-pro' and expands the deprecation warning logic to cover older Gemini models, recommending 'gemini-2.5-pro' as the replacement. Corresponding unit and system tests, along with SQL compilation snapshots, have been updated to use the new model. Feedback suggests simplifying the multiple 'startswith' checks in the deprecation logic by passing a tuple of prefixes to a single 'startswith' call.

Comment on lines +525 to +529
if (
self.model_name.startswith("gemini-2.0")
or self.model_name.startswith("gemini-1.5")
or self.model_name in ("gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-2.5-pro-preview-05-06")
):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The multiple startswith checks can be simplified and made more readable by passing a tuple of prefixes to startswith.

        if (
            self.model_name.startswith(("gemini-2.0", "gemini-1.5"))
            or self.model_name in ("gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-2.5-pro-preview-05-06")
        ):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant